package com.hmall.common.config;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;

/**
 * @Author MuYunzhewu
 * @Date 2022-08-11 下午 12:13
 * @Description:
 */

@Slf4j
public class ClientConfiguration {

    @Bean
    public RequestInterceptor handerInterceptor(){
        return new RequestInterceptor() {
            @Override
            public void apply(RequestTemplate requestTemplate) {
                log.warn("123");
                requestTemplate.header("authorization", "2");
            }
        };
    }
}